<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
	<title>支付宝支付配置</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
	#parse('/headFiles.html')
</head>
<body>
<div class="layui-fluid">
   	<div class="layui-form" id="LAY-config-form" wid100>
   		<div class="layui-form-item">
			<div class="layui-row">
				<div class="layui-col-sm6">
					<label class="layui-form-label">应用类型</label>
					<div class="layui-input-block">
						#if($appId)
						<input type="hidden" name="appType" value="$!{appType}">
						<div class="layui-form-mid">$!{appTypeName}</div>
						#else
						<select name="appType">
							#foreach($item in $appTypeList)
							<option value="$!{item.index()}" $!{utils.eq($item.index(),$appType,'selected')}>$!{item.note()}</option>
							#end
						</select>
						#end
					</div>
				</div>
				<div class="layui-col-sm6">
					<label class="layui-form-label">配置介绍</label>
					<div class="layui-input-block">
						<input type="text" class="layui-input" name="note" value="$!{note}">
					</div>
				</div>
			</div>
		</div>
		<div class="layui-row">
			<div class="layui-col-sm6">
				<div class="layui-form-item">
					<label class="layui-form-label">所属账号组</label>
					<div class="layui-input-block">
						<select id="accountGroupId" name="accountGroupId" class="layui-hide" lay-ignore>
							<option value="$!{accountGroupId}">$!{accountGroupName}</option>
						</select>
					</div>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-row">
				<div class="layui-col-sm6">
					<label class="layui-form-label">应用ID</label>
					<div class="layui-input-block">
						#if($appId)
						<input type="hidden" name="appId" value="$!{appId}">
						<div class="layui-form-mid">$!{appId}</div>
						#else
						<input type="text" class="layui-input" lay-verify="required" autocomplete="off" name="appId" value="$!{appId}">
						#end
					</div>
				</div>
				<div class="layui-col-sm6">
					<label class="layui-form-label">支付账号</label>
					<div class="layui-input-block">
						<input type="text" class="layui-input" lay-verify="required" autocomplete="off" name="pid" value="$!{pid}">
					</div>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-row">
				<div class="layui-col-sm6">
				   	<label class="layui-form-label">应用公钥</label>
					<div class="layui-input-block">
						<textarea class="layui-textarea" lay-verify="required" autocomplete="off" name="appPublicKey">$!{appPublicKey}</textarea>
					</div>
				</div>
				<div class="layui-col-sm6">
				   	<label class="layui-form-label">应用私钥</label>
					<div class="layui-input-block">
						<textarea class="layui-textarea" lay-verify="required" autocomplete="off" name="appPrivateKey">$!{appPrivateKey}</textarea>
					</div>
				</div>
			</div>
		</div>
	    <div class="layui-form-item" >
	    	<div class="layui-row">
				<div class="layui-col-sm6">
			    	<label class="layui-form-label">支付公钥</label>
					<div class="layui-input-block">
						<textarea class="layui-textarea" lay-verify="required" autocomplete="off" name="alipayPublicKey" >$!{alipayPublicKey}</textarea>
					</div>
				</div>
				<div class="layui-col-sm6">
				   	<label class="layui-form-label">小程序解码密钥</label>
					<div class="layui-input-block">
						<input type="text" class="layui-input" lay-verify="required" autocomplete="off" name="xcxDecryptKey" value="$!{xcxDecryptKey}" />
					</div>
				</div>
			</div>
	    </div>
	    <div class="layui-form-item">
	    	<div class="layui-row">
				<div class="layui-col-sm6">
					<label class="layui-form-label">证书路径</label>
					<div class="layui-input-block">
						<input type="text" class="layui-input" name="certificatePath" value="$!{certificatePath}">
					</div>
				</div>
	    	</div>
	    </div>
	    <div class="layui-form-item layui-hide">
    		<input type="button" lay-submit lay-filter="LAY-form-submit" id="LAY-form-submit" value="确定">
  		</div>
	</div>
</div>
#parse('/footFiles.html')
<script type="text/javascript">
layui.config({
	base: '$!{webRoot}/layuiadmin/'
}).extend({
	index: 'lib/index'
}).use(['index', 'form'],function(){
	
	$('#accountGroupId').select2({
		placeholder: "请选择支付账号组",
		width: '300px',
		theme: 'bootstrap',
		allowClear : true,
		ajax: {
			url: '$!{webRoot}/config/account_group/select.data',
			method: 'post',
			delay: 250,
			processResults: function (result) {
				if (result.code == 200) {
					return {
						pagination: {more: result.body.more},
						results: result.body.data || []
					};
				} else {
					return {results: []};
				}
			}
		}
	});
});
</script>
</body>
</html>